package com.jsshse.tag;

import java.io.IOException;
import java.util.Date;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.Tag;
import javax.servlet.jsp.tagext.TagSupport;

public class reportParamTag extends TagSupport {
 
	private static final long serialVersionUID = 1L;
	private JspWriter out = pageContext.getOut();
	private String reportID;
	
	@Override
	public int doStartTag() throws JspException {
		HttpServletRequest request;
		request = (HttpServletRequest) pageContext.getRequest();
		
		java.text.SimpleDateFormat formater = new java.text.SimpleDateFormat("yyyy-MM-dd");
		String date = formater.format(new Date());
		try {
			out.print(date);
			out.print("<br>");
			out.print(reportID);
		} catch (IOException e) {
			e.printStackTrace();
		}

		return Tag.SKIP_BODY;
	}
	public void setReportID(String reportID) {
		this.reportID = reportID;
	}
	
	
}